package com.gitee.neuray.security.generator.strategy;

import java.util.List;

/**
 * @author: zhhongyu
 * @description: mysql策略
 * @since: Create in 14:34 2020/2/14
 */
public class MysqlStrategy extends DataSourceStrategy {
    @Override
    public StringBuilder queryColumnsSQL(String viewOrtable) {
        StringBuilder sql = new StringBuilder(32);
        sql.append("select column_name columnName, data_type dataType, column_comment columnComment, column_key columnKey, extra from information_schema.columns ");
        sql.append(" where table_name = '");
        sql.append(viewOrtable);
        sql.append("' and table_schema = (select database()) order by ordinal_position  ");
        return sql;
    }

    @Override
    public StringBuilder queryTablesSQL() {
        //todo:mysql策略实现
        return null;
    }

    @Override
    public StringBuilder queryTableSQL(String tableName) {
        return null;
    }

}
